﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Management;
using System.Text;
using WMI.NET.Abstracts;
using WMI.NET.CIM;

namespace WMI.NET.ComputerSystemHardware.MotherboardControllerPort
{
    /// <summary>
    /// The Win32_1394ControllerDevice association WMI class relates the high-speed serial bus (IEEE 1394 Firewire) Controller and the CIM_LogicalDevice instance connected to it. This serial bus provides enhanced connectivity for a wide range of devices, including consumer audio or video components, storage peripherals, other computers, and portable devices. IEEE 1394 has been adopted by the consumer electronics industry and provides a Plug and Play-compatible expansion interface.
    /// </summary>
    public class Win32_1394ControllerDevice : CIM_ControlledBy
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public Win32_1394ControllerDevice(ManagementBaseObject mbo)
            : base(mbo)
        {

        }

    }

    /// <summary>
    /// 
    /// </summary>
    public class GetWin32_1394ControllerDevices : Win32Collection<Win32_1394ControllerDevice>
    {

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public override ReadOnlyCollection<Win32_1394ControllerDevice> GetCollection()
        {
            List<Win32_1394ControllerDevice> tempCollection = new List<Win32_1394ControllerDevice>();

            foreach (var s in searcher.Get())
            {
                Win32_1394ControllerDevice tempListItem = new Win32_1394ControllerDevice(s);
                tempCollection.Add(tempListItem);
            }

            return tempCollection.AsReadOnly();
        }

        /// <summary>
        /// 
        /// </summary>
        public GetWin32_1394ControllerDevices() : base("SELECT * FROM Win32_1394ControllerDevice") { }

    }

}
